package appium1.common;

import Pages.*;
import com.gargoylesoftware.htmlunit.Page;


public class PageManager {
    private Helper helper;
    private PageLogin pageLogin;
    private Pagemysetings pagemysetings;
    private PageCommon pageCommon;
    private Pagesettings pagesettings;
    private PageAbout pageAbout;
    private PageHome pageHome;
    private PageNewsDetail pageNewsDetail;
    private PageUserFavoriteList pageUserFavoriteList;
    private PageQQ pageQQ;

    public PageManager(Helper helper) {
        this.helper = helper;
    }

    public PageLogin getPageLogin() {
        if (pageLogin == null) {
            pageLogin = new PageLogin(helper);
        }
        return pageLogin;
    }

    public Pagemysetings getPagemysetings() {
        if (pagemysetings == null) {
            pagemysetings = new Pagemysetings(helper);
        }
        return pagemysetings;
    }

    public PageCommon getPageCommon() {
        if (pageCommon == null) {
            pageCommon = new PageCommon(helper);
        }
        return pageCommon;
    }

    public Pagesettings getPagesettings() {
        if (pagesettings == null) {
            pagesettings = new Pagesettings(helper);
        }
        return pagesettings;
    }

    public PageAbout getPageAbout() {
        if (pageAbout == null) {
            pageAbout = new PageAbout(helper);
        }
        return pageAbout;
    }
    public PageHome getPageHome(){
        if(pageHome==null){
            pageHome=new PageHome(helper);
        }
        return pageHome;
    }
    public PageNewsDetail getPageNewsDetail(){
        if(pageNewsDetail==null){
            pageNewsDetail=new PageNewsDetail(helper);
        }
        return pageNewsDetail;
    }

    public PageUserFavoriteList getPageUserFavoriteList(){
        if(pageUserFavoriteList==null){
            pageUserFavoriteList=new PageUserFavoriteList(helper);
        }
        return pageUserFavoriteList;
    }
    public PageQQ getPageQQ(){
        if(pageQQ==null){
            pageQQ=new PageQQ(helper);
        }
        return pageQQ;
    }
}